﻿using System.Collections.Specialized;

namespace VariableNamingAndSimplifiedExpressions
{
    using System;
    using System.Globalization;
    using System.Threading;

    class RectangleUsage
    {
        static void Main(string[] args)
        {
            Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;

            Rectangle rectangle = new Rectangle(7, 6);
            PrintToConsole(rectangle);

            Rectangle rotatedRectangle = Rectangle.GetRotated(rectangle, -45);
            PrintToConsole(rotatedRectangle);
        }

        private static void PrintToConsole(Rectangle rectangle)
        {
            Console.WriteLine("Rectangle (width: {0,5:F2}, height: {1,5:F2})", rectangle.Width, rectangle.Height);
        }
    }
}
